package com.aiyige.page.my.order.model;

/**
 * Created by xiachao on 2018/1/31.
 */

public class SubjectSelection {
    private String subject;
    private boolean isSelected;

    public SubjectSelection(String subject, boolean isSelected) {
        this.subject = subject;
        this.isSelected = isSelected;
    }

    private SubjectSelection(Builder builder) {
        setSubject(builder.subject);
        setSelected(builder.isSelected);
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public boolean isSelected() {
        return isSelected;
    }

    public void setSelected(boolean selected) {
        isSelected = selected;
    }

    public static final class Builder {
        private String subject;
        private boolean isSelected;

        private Builder() {
        }

        public Builder subject(String subject) {
            this.subject = subject;
            return this;
        }

        public Builder isSelected(boolean isSelected) {
            this.isSelected = isSelected;
            return this;
        }

        public SubjectSelection build() {
            return new SubjectSelection(this);
        }
    }
}
